package Object和匿名内部类及异常;


class Aniaml16{
	void shout(){
		System.out.println("动物的叫声");
	}
	public String toString(){//重写toString的方法
		return "I am an animal";
		
	}
}
public class Object类 {
	   public static void main(String[] args) {
		   Aniaml16 animal16=new Aniaml16();
		   System.out.println(""+animal16.toString());
		   System.out.println(""+animal16.getClass());
		   System.out.println("返回对象所属类的类名："+animal16.getClass().getName());
		   System.out.println(animal16.hashCode());
		   System.out.println(animal16);
	}
}
